/**
 * Numbers.java
 * @author: liuex
 * 2008-3-16 ����02:14:50
 *
 * note: 
 */
package org.lex.math;

public class Numbers {
	public static final double epsilon = 1e-6;

	public static boolean isInteger(double d) {
		return Numbers.isInteger(d, Numbers.epsilon);
	}

	public static boolean isInteger(double d, double epsilon) {
		if (d < 0.0D)
			d = java.lang.Math.abs(d);
		double dd = d - java.lang.Math.ceil(d);
		return dd <= epsilon;
	}
}
